var express = require('express')
var router = express.Router()
var api = require('../module/jurisdiction')

/*查询系统全部权限*/
router.post('/get_jur_module', async function (req, res, next) {
    api.get_jur_module(req, res, next)
})

/*查询公司所有权限*/
router.post('/get_team_jur_module', async function (req, res, next) {
    api.get_team_jur_module(req, res, next)
})

/*新增权限*/
router.post('/add_jur', async function (req, res, next) {
    api.add_jur(req, res, next)
})
/*查询权限权限*/
router.post('/find_jur', async function (req, res, next) {
    api.find_jur(req, res, next)
})

/*修改权限*/
router.post('/update_jur', async function (req, res, next) {
    api.update_jur(req, res, next)
})
/*设置权限*/
router.post('/setting_jur', async function (req, res, next) {
    api.setting_jur(req, res, next)
})
/*设置权限*/
// router.post('/unbound_jur', async function (req, res, next) {
//     api.unbound_jur(req, res, next)
// })
/*删除权限*/
router.post('/delete_jur', async function (req, res, next) {
    api.delete_jur(req, res, next)
})

/*获取单个用户所有权限*/
router.post('/find_user_jur', async function (req, res, next) {
    api.find_user_jur(req, res, next)
})
/*获取单个控件权限*/
router.post('/find_control_jur', async function (req, res, next) {
    api.find_control_jur(req, res, next)
})

/*新增单个控件权限*/
router.post('/add_control_jur', async function (req, res, next) {
    api.add_control_jur(req, res, next)
})


router.params.name = 'jurisdiction module'
module.exports = router
